package com.banmao.mall.mapper;

import com.banmao.mall.model.bo.client.comment.CommentListBO;
import com.banmao.mall.model.pojo.Comment;
import com.banmao.mall.model.vo.admin.comment.Items;
import com.banmao.mall.model.vo.client.goods.CommentDataVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CommentMapper {
    int deleteByPrimaryKey(Integer id);

    int deleteWithLogicByKey(Integer id);

    int insert(Comment record);

    int insertSelective(Comment record);

    Comment selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Comment record);

    int updateByPrimaryKey(Comment record);

    List<CommentDataVO> selectByGoodsID(Integer goodsId);

    Integer selectCountByGoodsID(Integer goodsId);

    List<Comment> getCommentListByMulCondition(
            @Param("page") Integer page,
            @Param("limit") Integer limit,
            @Param("sort") String sort,
            @Param("order") String order,
            @Param("userId")Integer userId,
            @Param("valueId")Integer valueId );
//Integer page, Integer limit, String sort, String order,Integer userId,Integer valueId
    Integer selectCommentsCount();

    //ps
    List<Comment> selectByRequire(CommentListBO commentListBO);

    Integer selectCountByRequire(@Param("valueId") Integer valueId, @Param("type") Byte type, @Param("hasPic") Byte hasPic);
}